<?php
/**
 * Created by 项目.
 * User: xuguopeng
 * Date: 2020-06-14
 * Time: 13:00
 */

namespace app\api\controller\v1;


use app\api\controller\BaseController;
use app\api\service\partner\CreateCitySer;
use app\api\service\partner\CreateCountySer;
use app\api\service\partner\CreateProvinceSer;
use app\api\service\partner\PartnerSer;
use app\api\validate\Paging;

class Partner extends BaseController
{
    // 添加省份合伙人
    public function createProvince($province)
    {
        $createProvince = new CreateProvinceSer($province);
        return $createProvince->set();
    }

    // 添加城市合伙人
    public function createCity($province,$city)
    {
        $createCity = new CreateCitySer($province,$city);
        return $createCity->set();
    }

    // 添加区/县合伙人
    public function createCounty($province,$city,$county)
    {
        $createCounty = new CreateCountySer($province,$city,$county);
        return $createCounty->set();
    }

    // 获取合伙人的信息
    public function getPartnerMoney($status,$page,$limit)
    {
        (new Paging())->goCheck();
        $partnerSer = new PartnerSer($status,$page,$limit);
        return $partnerSer->get();
    }
}